import { postRequest, getRequest } from '/@/lib/axios';

export const api = {
  page (param: any) {
    return postRequest('/eapi/optimization/page?Content-Type=application/json', param);
  },
  add (param: any) {
    return postRequest('/eapi/optimization/add?Content-Type=application/json', param);
  },
  update (param: any) {
    return postRequest('/eapi/optimization/update?Content-Type=application/json', param);
  },
  delete (indocno: any) {
    return getRequest('/eapi/optimization/delete?indocno=' + indocno, null);
  },
  getDefectData (param: any) {
    return postRequest('/eapi/coil_stats/defect_reason_loss', param);
  },
  getSpeData (param: any) {
    return postRequest('/eapi/coil_stats/steel_grade_by_spec', param);
  },

  // 来料卷重范围
  getResource(param: any) {
    return postRequest('/eapi/coil_stats/material_weight_range', param);
  },

  // 单产线分卷信息
  getCoilSplit(param: any) {
    return postRequest('/eapi/coil_stats/track', param);
  },

  // 单产线分卷分析
  getCoilCount(param: any) {
    return postRequest('/eapi/coil_stats/coilCount', param);
  },

  // 单产线分卷分析建议
  getSummary(param: any) {
    return postRequest('/eapi/coil_stats/summary', param);
  },
};